package strain.expression;

import strain.domain.Domain;
import strain.domain.InconsistentDomainException;
import strain.solver.SolverState;

public interface Expression<T, D extends Domain<T>> {
    
    int getId();
    void addTo(SolverState solverState);
    
    D getDomain();
    
    boolean isBound();
    T getBoundValue();
    
    boolean bind(T value)       throws InconsistentDomainException;
    boolean retain(D values)    throws InconsistentDomainException;
    boolean remove(D values)    throws InconsistentDomainException;
    boolean remove(T value)     throws InconsistentDomainException;
    
    boolean propagate() throws InconsistentDomainException;
    
}
